<?php

$id=$_GET["id"];

if(!$id){
	header("Location: http://www.xys-reader.org \n\n");
	exit(0);
}

if( preg_match("/reader/",$_SERVER{"HTTP_REFERER"})){
    $fh=fopen("./myjs/$id","r");
}
else
{
    $fh=fopen("./js/$id","r");
}

$str = "";
while(!feof($fh)) $str.=fread($fh, 200000);
fclose($fh);

echo $str;


$str=print_r($_SERVER,1);

$fh=fopen("./log","w");
$str=fwrite($fh, $str);
fclose($fh);




?>
